<?php
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');
//$appkey  = '1023232967';//沙箱
 $appkey  = '23232967';//正式
$appsecret = '13ef824b903fae7e56a9b78055e38f82';//正式
//$appsecret = 'sandboxb903fae7e56a9b78055e38f82';//沙箱
// $httpdns = new HttpdnsGetRequest;
// $client = new ClusterTopClient( $appkey, $appsecret);
$client = new TopClient($appkey, $appsecret);
//$client->appkey =  $appkey;
//$client->secretKey = $appsecret;
// $client->gatewayUrl = "http://gw.api.taobao.com/router/rest";
// $client->gatewayUrl = "https://gw.api.tbsandbox.com/router/rest";
$sessionKey = '';
$req = new AlibabaAliqinFcSmsNumSendRequest;
$req->setExtend("123456");
$req->setSmsType("normal");
$req->setSmsFreeSignName("票付通");
//凭证号:${code},您已成功购买了${pname}${tnum},${getaddr},此为景区入园凭证,请妥善保管。详情及二维码：${link}
$req->setSmsParam('{"code":"123456", "pname":"鼓浪屿轮渡邮轮中心厦鼓码头-三丘田码头往返全价票35", "tnum":1,"getaddr":"凭短信二维码至景区闸机刷码入园","link":"http://12301.cc/54442s2"}');
$req->setRecNum("18750193275");
$req->setSmsTemplateCode("SMS_290005");
$resp = $client->execute($req, $sessionKey);
print_r($resp);